package com.hunter.data;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2017/6/23.
 */
public enum UrlType {
    XINGTAI(1305, Object.class),
    HANGDAN(1304, Object.class);

    private int value;
    private Class<?> aClass;

    private static final Map<Integer, UrlType> intToTypeMap = new HashMap<Integer, UrlType>();

    static
    {
        for(UrlType type : UrlType.values())
        {
            intToTypeMap.put(type.value, type);
        }
    }

    public static UrlType fromInt(int value)
    {
        UrlType type = intToTypeMap.get(value);
        if(type == null)
        {
            return null;
        }
        return type;
    }

    UrlType(int value, Class<?> aClass) {
        this.value = value;
        this.aClass = aClass;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public Class<?> getaClass() {
        return aClass;
    }

    public void setaClass(Class<?> aClass) {
        this.aClass = aClass;
    }

}
